<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/axios.min.js"></script>
    <script src="/js/util.js"></script>
    <script>
        var id = getQuery("id");
        window.onload = function () {
            findRole()
        }

        function findRole() {
            axios.get("/role/findById",{
                params:{
                    id
                }
            }).then(e => {
                var info = e.data;
                $("roleSpan").innerHTML = info.name;
                var str = "";
                for(var i = 0;i < info.gradeList.length;i++){
                    str += `${info.gradeList[i].name}、`
                }
                $("gradeDiv").innerHTML = str;
            })
        }
    </script>
</head>
<body>
    角色名称：<span id="roleSpan"></span><br>
    拥有权限：<div id="gradeDiv"></div>
</body>
</html>